#include <gtk/gtk.h>
#include "c_s.h"

enum ui {INIT, MAIN, REGISTER, ABOUT, CHAT};

gchar chat_user[USER_NUM_MAX][NAME_LEN_MAX + 1];
GtkBuilder *init_builder, *main_builder, *reg_builder, *about_builder, *chat_builders[USER_NUM_MAX];

GtkBuilder *get_builder (gint);
GtkBuilder *get_chat_builder (const gchar *);
void reinit_chat_builder (const gchar *);

void on_button1_clicked (GtkWidget *, gpointer);
void *user_ls_thread (void *);
void *listen_thread (void *);
void on_button2_clicked (GtkWidget *, gpointer);
void on_button3_clicked (GtkWidget *, gpointer);
void on_reg_ok_button_clicked (GtkWidget *, gpointer);
void on_reg_cancel_button_clicked (GtkWidget *, gpointer);
void on_main_treeview_double_clicked (GtkTreeView *, GtkTreePath *, GtkTreeViewColumn *, gpointer);
void on_window_destroy (GtkWidget *, gpointer);
void on_main_window_destroy (GtkWidget *, gpointer);
void on_chat_window_destroy (GtkWidget *, gpointer);
void on_chat_send_msg_button_clicked (GtkWidget *, gpointer);

